//
//  MTClubActivitiesModel.swift
//  MT
//
//  Created by ooops on 2019/12/28.
//  Copyright © 2019 张强. All rights reserved.
//

import Foundation
import ObjectMapper
import MTCategory

class MTClubActivitiesModel: Mappable {

    /// 请求是否成功的code
    var code: Int?
    /// 请求返回的Message
    var message: String?
    /// 分页对象
    var page: PageModel?
    /// 时间戳
    var timestamp: TimeInterval?

    var result: [MTClubActivitModel]?

    required public init?(map: Map) {

    }

    func mapping(map: Map) {
        code    <- map["code"]
        message <- map["message"]
        page <- map["page"]
        timestamp <- map["timestamp"]
        result  <- map["result"]
    }
}


class MTClubActivitModel: Mappable {

    /// 活动Id
    var id: Int?
    /// 俱乐部id
    var clubId: String?
    /// 活动名称
    var name: String?
    /// 活动人数
    var num: Int = 0
    /// 省
    var province: String?
    /// 市
    var city: String?
    /// 县
    var area: String?
    /// 活动地址
    var address: String?
    /// 活动描述
    var remark: String?
    /// 已报名登记数 0
    var enrollNum: Int = -1
    /// 是否是活动拥有者
    var isOwner: Bool?
    /// 活动当前状态
    var activityStatus: Int = -1
    /// 活动开始时间
    var startTime: String?
    /// 活动发布者头像
    var href: String?
    /// 活动发布者昵称
    var nickname: String?
    /// 是否已经加入活动
    var joined: Bool?
    
    required public init?(map: Map) {

    }

    func mapping(map: Map) {
        id        <- map["id"]
        clubId        <- map["clubId"]
        name        <- map["name"]
        num        <- map["num"]
        province        <- map["province"]
        city        <- map["city"]
        area        <- map["area"]
        address        <- map["address"]
        remark        <- map["remark"]
        enrollNum        <- map["enrollNum"]
        isOwner        <- map["isOwner"]
        activityStatus        <- map["activityStatus"]
        startTime        <- map["startTime"]
        href        <- map["href"]
        nickname        <- map["nickname"]
        joined        <- map["joined"]
    }

}
